package com.yet.dto;

import java.io.Serializable;

import com.yet.container.registry.RegistryMeta.ServiceMeta;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class Request implements Serializable {
	private static final long serialVersionUID = 1L;
	private String id;
	private Class<?> className;
	private String methodName;
	private Class<?>[] parameterTypes;
	private Object[] parameters;
	private String name;
	private String version;

	public ServiceMeta getServiceMeta() {
		return new ServiceMeta(name, version, "");
	}

	public void setServiceMeta(ServiceMeta serviceMeta) {
		this.name = serviceMeta.getName();
		this.version = serviceMeta.getVersion();
	}
}
